allow loading tmx data from javascript objects instead of only from xhr

I wanted to get the tmx file without needing the XMLHttpRequest. Let me know if I need to do anything else to get it merged (or if there was a better way to go about it...).