Update Core.php

* add function_exists for mb_regex_encoding in case is not enabled on the server