fix version detection for packaging, refs #1184, #1185