Not used Photon before but with some things that can help with UnityScript (js) and 3rd party components are:
You sometimes need to import the component in your script. For example at the very start of the script:
import Photon.MonoBehaviour;
The above example might be using the wrong name. But give it a go.
Also some 3rd party components when being used with UnityScript need to be moved into a directory called ‘Plugins’ which lives inside the folder called ‘Assets’. So for example your file structure may look something like this:
MyCoolVideoGame\Assets\Plugins\Photonnetworkstuff
Obviously I do not know the correct names not having used Photon, but hopefully the above will put you on the right track!