$sha1 was added in 6.3. The reason I returned a SHA-1 hash of the serial number is because you shouldn't be handing it out. People will be able to use your serial number to register an illegitimately gained OS if you don't encrypt it.
You could use $md5() instead of $sha1(), which is supported by many more versions.