Moved libm check to the root, not only for tests