prepare for freebsd support

This merge request paves the way for freebsd support,
but its actual support is not yet included.

- don't use hardcoded bash paths
- the host compiler isn't gcc perse
- allow compilation without extended attributes
- stat64 is a glibc specific thing