Fix #1198
(cherry picked from commit ef07b7ecb120400fae9446183c355779030a1d09)
Build with -j4