get_licenses - be version-aware

patch by amnong