Expand identify_variables() for multiple lines

Change handling of argument to identify_variables() to account for
multiple equations (separated by newline characters) in a single string.