No scan opt if custom scan

Disables scan pattern optimization (JBOOLEAN_OPTIMIZE_SCANS extension
parameter) if a custom scan pattern is provided.
Fixes #137