Fix v8 dependency issues in the ubuntu package

Closes #2101
Closes #2261
OTS review by @Tryneus