Fix ubuntu (probably newer gcc) folly check

Summary: use cxx check compiles not c check compiles for folly weak symbols check
this is failing on some os/gcc combinations

Reviewed By: @JoelMarcey

Differential Revision: D1456030