MFC: r263650, r263686

Add missing dependency on libm