Make sure syntax errors in regular expressions raise conforming exceptions

Just letting the error from new RegExp through creates an exception missing the
pos/loc/raisedAt properties.

Issue #82
Issue #81