fix js style suggested by jshint and rename useBom to useBOM