Added PageSegMode support

This allows autodetection of page layouts (which means it can now work
with multiple columns).