Fix importing as AMD module
Fix importing as AMD module

Importing was immediately running Pig with no arguments, which
would fail if there was no element with an ID of 'pig' present at
that time. Also prefer 'window' to 'this' where available, in case
'this' doesn't refer to 'window'.

schlosser/pig.js,schlosser/pig.js