Compile deps with optimizations for benches

Previously only the local package was erroneously compiled with optimizations.

Closes #728