Fixup in the build system

- Fixed the detection of GL version and extensions that
  failed on windows.
- Updated the configure.py script to ignore if the build
  directory cannot be completelly removed.