configure: Move adding of compat objects out of libc detection