Add support for the -F command line option

Fixes #2334