Reduce code duplication in ofx.js

I was working towards initial support of downloading investment statements and I wanted to do some minor code cleanup before introducing a new if block.  A second pull request with the investment support will be headed your way.