Quick build fixes

Fixes 2 minor issues that manifested on OSX+homebrew, but aren't specific to that config. Thanks to @pnagurny for reporting/testing.

Closes #5064.