Fixes for generic build.