Fix compatibility.cpp/.h for non-Linux

Reviewed By: @ptarjan

Differential Revision: D1119787