build: Fix boost build on some platforms

When the libpath doesn't line up with the value from config.sub, we don't find
the correct path to boost's libs. This adds a hack to try another path before
giving up.

Should close #3219.

Rebased-From: 54c7df81
build: fix FDELT_TYPE configure check

This probably never worked properly. Confirmed working now with every compiler
I throw at it.

Rebased-From: 8021cf8
libc-compat: add new symbol that's now needed

Rebased-From: 565e569