Code as Reward: Empowering Reinforcement Learning with VLMs