Add configure script to detect compiler flags and feature test macros