Add a util function to convert strings to longs