configure: Adjust header-path discovery to work sanely with spaces and backslashes in paths