Adds Duration.parse method to parse strings.