Some minor tweaks to ensure correctness

Also fix compilation of the subsequence matcher on OS X