Change capExtension to be nested into javacard
Improve platform dependent value handling