use only libs installed by railsinstaller when using smf, closes #1803