Fixes for Gradle 2.0-rc1

Wrap the configurations in a collection to make it lazy to work around
GRADLE-3101 (which is a result of GROOVY-6018).

Fixes #41