Beijing spies a useful friend in Castro