* build/SerfVersion.cmake: Wrap the version parsint into a function to hide variables in a local scope. Simplify regular expressions.