fix(angular.copy): clone regexp flags correctly

Closes #5781
Now that is very neat. You're the first person I've seen do it that way.
Normally people just go through each of the flags in turn.