A nicer way of detecting the platform

Inspired by https://github.com/doctrine/doctrine2/blob/master/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php#L188