Use a more descriptive define to prevent collisions

This caused the build to fail on OpenBSD.
OpenBSD should not link with -lcrypt option
Add system CFLAGS after vendor library paths

This ensures that we pick up vendor paths before any system paths. Fixes
building with for example older libffi version in the path that don't
support certain functions.