Adapted to html5 target.

Previous implementation caused error while using compressed tmx maps with html5/js target. Added conditionals to prevent that behaviour (you can only use uncompressed maps with html5/js).