fix(angular.copy): clone regexp flags correctly

Closes #5781