build: Reduce redundancy in configure.ac, convert osl detection.