Updates to allow compilation against Kepler (and Juno)

This PR is build on top of #459.
Adds a Kepler profile, and fix the tests to work when compiled against Juno and Kepler.