Tweak regexps to be more 5.8 compatible.

See #34