More robust version reporting (stolen from @lunaryorn)