Fix build on unavailable dependency. Closes #643.