Fixed AMD loading problems

Signed-off-by: Lars Lindholm <lars@softbox.nu>
Changed API call mapping to LocomoteMap
Merge pull request #79 from LingoLasse/amdloading

jslib: Fixed AMD loading problems