Merge pull request #2 from whitequark/master

ST2 support (partial)
Restore compatibility with ST3.