Some work towards supporting building OpenCOR with Ninja (#364) [ci skip].

Not only does this work with Ninja (on Linux and OS X since it was
already working fine on Windows), but it’s also neater.