Changed handling of oldincludedir
Added CMake integration.