Convert a string to an integer using the boost lexical_cast