[BUGFIX] Fix PHP warnings with PHP 5.5.

The /e modifier for preg_replace is deprecated since PHP 5.5.
We need to replace it with preg_replace_callback.

This fixes #3 and fixes #25.