Fixes to get SoftHSMv2 to build in Jenkins

Do not merge yet! Going to test this with the build-bot.