Positron annihilation in a simulated interstellar medium