Replace string parsing function from atol to StringToLong

int64_t on same architectures could be long int and on some others could be long long int

Closes #339