An efficient stabilized boundary element formulation for 2D time-domain acoustics and elastodynamics