gyp: fix `ninja` build on linux

fix #6679