Require time before monkey-patching it

Same 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.
Merge pull request #12712 from robin850/fix-build

Require time before monkey-patching it