Fix "generic" legacy build. Closes #782.