Fix version retrieval from attribute
Fix build with xbuild