The interstellar medium in the starburst regions of NGC 253 and NGC 3256