only use 'j' format option if available

Fixes #13 and #15, part of #14