improve the implementation of linsolve for Octave

Commit d32e076b introduced a minimal implementation of linsolve for Octave. We should probably provide a better one (maybe through an Oct-file).