An unsafe use of unsafeUseAsCString

The use was unsafe because the bytestring could be garbage-collected before the regex object is.

I haven't been able to create a test case where this causes a segfault.