A couple build system fixes.

(sorry, just learning how this pull request thing works.)

- Use pkg-config to find Wayland libraries in the configure script.
- Fix a small CMake issue.