Fix copy/paste error in regex flag parsing
Remove seemingly unnecessary dependency, implementation reads more like ECMA5 spec