Ensure that Photon is enabled before generating Photon URL.

This completes the initial fix of #1083.