Updated configure script with more header checks