Extension of vector-valued holomorphic and meromorphic functions