Detection for files with byte order mark (BOM)

If files begin with a BOM (U+FEFF) the AMD and CommonJS detection will fail. I noticed this when using the SystemJS builder: https://github.com/systemjs/builder/issues/25