Add support for various join types.

Fixes issue #9