Make the PollJoy.js support AMD like Require.js.
It only changes the behaviour of the code if the projects support AMD like Require.js.
It will not change anything if the projects do not support AMD.
Merge pull request #1 from KennyTang123/master

Make the PollJoy.js support AMD like Require.js.