Enable support for Ninja build generator

Use the Ninja build generator if '--enable-ninja' is passed on the
command line to ./configure (or of course if -GNinja is passed
directly to CMake).
Merge pull request #306 from rolk/306_ninja

Enable support for Ninja build generator