fix the RoutingLoader to be compatible with PHP < 5.3.6

because getExtension() appears in PHP5.3.6