Add libc++ support from karimnaaji's repo

See #17. This is mostly a copy-and-paste from karimnaaji's version, except with support for the static variant as well.