Miscellaneous improvements for GCC 4.7

* Enable graphite loop optimization.
  - Depends on legacy versions of support libraries.
* Other configure switch improvements.