Fix hibernate on FreeBSD

And g_assert_nonnull requires glib 2.40 so we'll do without it.