Prevent proccessing of scripts loading via ajax

Using silverstripe-ajax with jquery.ondemand ( loading css and javascript requirements loaded via ajax) can cause the browser to hang while silverstripe-ajax attempts to parse javascript files.
This commit checks the datatype and skips region parsing for javascript files.
Merge pull request #1 from cjsewell/patch-1

Prevent proccessing of scripts loading via ajax