Lowercase string before comparing magic methods

When comparing double underscored methods against magic methods, the name should be lowercased otherwise it will not match (e.g. toString => tostring).