Stability of planetary orbits in binary systems