Require time before monkey-patching it

Hello,

This pull request has the same goal as #12710 but for the time module this time. This time it should fix the Active Model test suite in isolation avoiding a `TypeError` to be raised about the superclass of the `DateTime` object.

Here is the [error](https://travis-ci.org/rails/rails/jobs/13310160#L1866) on Travis.

Have a nice day.