Support providing a keystore from the classpath. Resolves #1853